#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
#define lld long double
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vs vector<string>
#define vvi vector<vector<int>>
#define vpii vector<pair<int,int>>
#define mii map<int,int>
#define mci map<char,int>
#define umii unordered_map<int,int>
#define pii pair<int,int>
#define si set<int>
#define pqmax priority_queue<int>
#define pqmin priority_queue <int, vector<int>, greater<int>>
#define sqrt sqrtl
#define yes cout<<"Yes"<<endl
#define no cout<<"No"<<endl
#define notpos cout<<-1<<endl
#define setbits(a) __builtin_popcountll(a)
#define ctz(a) __builtin_ctzll(a)
#define clz(a) __builtin_clzll(a)
#define f(n) for(int i=0;i<n;i++)
#define fj(n) for(int j=0;j<n;j++)
#define f1(n) for(int i=1;i<=n;i++)
#define newl cout << "\n"
#define in(x) insert(x)
#define rev(v) reverse(v.begin(), v.end())
#define vin(v,n) int n; cin>>n; vector<int> v(n); for(int i=0;i<n;i++) cin>>v[i];
#define out(v) for(auto x: v) cout<<x<<" "; cout<<"\n";
#define test int t; cin>>t; while(t--)
#define sz(a) (int)a.size()
#define sortf(a) sort(a.begin(),a.end())
#define sortr(a) sort(a.rbegin(),a.rend())
#define unq(v) sortf(v); v.resize(distance(v.begin(), unique(all(v))));
#define unq1(v) v.resize(distance(v.begin(), unique(all(v))));
#define all(a) a.begin(),a.end()
#define gsum(a) accumulate(a.begin(),a.end(),0LL)
#define gmax(a) *max_element(a.begin(),a.end())
#define gmin(a) *min_element(a.begin(),a.end())
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define d1(x) cout<<#x<<" "<<x<<endl;
#define d2(x,y) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<endl;
#define d3(x,y,z) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<endl;
const int mod = 1000000007;
// const int mod = 998244353;
const int inf = LLONG_MAX;
const lld eps = 1e-7;
const lld pi = 3.1415926535897932;
const long long INF = 1e18+5;
const int N=1000;
int fact[N+1];
int inv[N+1];
int spf[N+1];
bool isprime[N+1];
int bepower(int x,int n){int res=1;while(n){if(n%2==1){res*=x;res%=mod;}n/=2;x*=x;x%=mod;}return res;}
int bepowermod(int x,int n){ if(n==0)return 1;int res=1;while( n > 0){if(n%2==1){res = (res*x)%mod;}x=(x*x)%mod;n/=2;}return res;}
int ncr(int n,int r){return (((fact[n]*inv[n-r])%mod)*inv[r])%mod;}
int gcd(int a, int b){if (a % b == 0)return b;return gcd(b, a % b);}
int lcm(int a,int b){return (a/(__gcd(a,b)))*b;}
void sieve(){spf[0] = 1;spf[1] = 1;for(int i=2;i<N;i++) spf[i] = i;for(int i=2;i*i<N;i++){if(spf[i] == i){for(int j=i*i;j<N;j+=i){spf[j] = i;}}}}
void precompute(){fact[0]=1;inv[0]=1;for(int i=1;i<=N;i++){fact[i] = fact[i-1]*i; fact[i]%=mod;inv[i]=bepower(fact[i],mod-2);}}
void calallprime(){for (int i = 0; i <= N;i++)isprime[i] = true;isprime[1] = false;for (int i = 2; i < N + 1; i++){if (isprime[i]){for (int j = i * i; j < N + 1; j += i)isprime[j] = false;}}}
void solve(){
int n;
cin >> n;
vi ans;
for (int i = 2; i<=n;i++){
if(spf[i]==i)
{
int q = 1;
while (q <= n / i) {
q *= i;
ans.pb(q);
}
}
}
cout << sz(ans) << endl;
out(ans);
}
int32_t main()
{
fastio;
// precompute();
sieve();
// calallprime();
// test{
solve();
// }
return 0;
}
50A - Domino piling | 479A - Expression |
1480A - Yet Another String Game | 1216C - White Sheet |
1648A - Weird Sum | 427A - Police Recruits |
535A - Tavas and Nafas | 581A - Vasya the Hipster |
1537B - Bad Boy | 1406B - Maximum Product |
507B - Amr and Pins | 379A - New Year Candles |
1154A - Restoring Three Numbers | 750A - New Year and Hurry |
705A - Hulk | 492B - Vanya and Lanterns |
1374C - Move Brackets | 1476A - K-divisible Sum |
1333A - Little Artem | 432D - Prefixes and Suffixes |
486A - Calculating Function | 1373B - 01 Game |
1187A - Stickers and Toys | 313B - Ilya and Queries |
579A - Raising Bacteria | 723A - The New Year Meeting Friends |
302A - Eugeny and Array | 1638B - Odd Swap Sort |
1370C - Number Game | 1206B - Make Product Equal One |